package com.alpha.core.utils;

import java.util.Collection;
import java.util.List;

/**
 * Java Bean工具类
 *
 * @author chenruwan
 * @since 2022-01-01
 */
public class BeanUtil {
    /**
     * @see cn.hutool.core.bean.BeanUtil#copyToList(Collection, Class)
     */
    public static <T> List<T> copyToList(Collection<?> collection, Class<T> targetType) {
        return cn.hutool.core.bean.BeanUtil.copyToList(collection, targetType);
    }

    /**
     * @see cn.hutool.core.bean.BeanUtil#toBean(Object, Class)
     */
    public static <T> T toBean(Object source, Class<T> clazz) {
        return cn.hutool.core.bean.BeanUtil.toBean(source, clazz);
    }

    /**
     * Utility classes should not have public constructors
     */
    private BeanUtil() {
    }
}
